package myschool.myshchool15.mystudent;

import java.util.Scanner;

/**
 * for循环
 * for(参数初始化；条件判断；更新循环变量）{
 *     循环操作
 * }
 */
/**public class MyStudent_16 {
*   public static void main(String[] args) {
*
*
*    for(int i = 0; i <100; i++){
*        System.out.println("好好学习！");
*    }
*    }
}*/
public class For {
    public static void main(String[] args){
        Scanner input = new Scanner(System.in);
        System.out.println("请输入学生姓名：");
        String student = input.next();
        int score;
        double sum = 0;
        double avg;
        for( int number = 1 ;number < 6;number++){
            System.out.println("请输入5门功课中第"+number+"门课的成绩：");
            score =input.nextInt();
            sum = sum+score;
        }
        avg = sum/5;
        System.out.println(student+"的平均分输是："+avg);
    }
}